#include "Point3d.h"

Point3d::Point3d(double i_x, double i_y, double i_z) : m_x(i_x), m_y(i_y), m_z(i_z)
  {

  }
void Point3d::GetAttributes(double &o_x, double &o_y, double &o_z)
  {
  o_x = m_x;
  o_y = m_y;
  o_z = m_z;
  }
double Point3d::GetX()
  {
  return m_x;
  }
double Point3d::GetY()
  {
  return m_y;
  }
double Point3d::GetZ()
  {
  return m_z;
  }


void Point3d::SetAttributes(double i_x, double i_y, double i_z)
  {
  m_x = i_x;
  m_y = i_y;
  m_z = i_z;
  }
void Point3d::SetX(double i_x)
  {
  m_x = i_x;
  }
void Point3d::SetY(double i_y)
  {
  m_y = i_y;
  }
void Point3d::SetZ(double i_z)
  {
  m_z = i_z;
  }

double Point3d::GetDistance( Point3d i_point)
  {
  double x = (i_point.GetX() - this->GetX())*(i_point.GetX() - this->GetX());
  double y = (i_point.GetY() - this->GetY())*(i_point.GetY() - this->GetY());
  double z = (i_point.GetZ() - this->GetZ())*(i_point.GetZ() - this->GetZ());
  double distance = sqrt(x+y+z);
  return distance;
  }